package cn.itsource.ymcc.config;

import com.alipay.easysdk.kernel.Config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "ail.pay")//两级
@Data
public class AilPayConfig {
    private String protocol;
    private String gatewayHost;
    private String signType;
    private String appId;
    private String merchantPrivateKey;
    private String notifyUrl;
    private String alipayPublicKey;

    public Config getOptions() {
        Config config = new Config();
        config.protocol = protocol;
        config.gatewayHost = gatewayHost;
        config.signType = signType;
        config.appId = appId;
        config.merchantPrivateKey = merchantPrivateKey;
        config.notifyUrl = notifyUrl;
        config.alipayPublicKey = alipayPublicKey;
        return config;
    }

}
